<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $language ?>">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="author" content="Erko Risthein" />
	<meta name="description" content="decode explorer" />
	<title>decode explorer: <?php
$breadcrumb_length = count($breadcrumb);
foreach ($breadcrumb as $index => $folder) {
	echo $folder['name'];
	if ($index != $breadcrumb_length - 1) { //if we haven't yet reached the end of the array
		echo ' &raquo; ';
	}
}
?></title>
	<link rel="stylesheet" type="text/css" href="./decode/style/style.css" media="screen" />
	<link rel="stylesheet" type="text/css" href="./decode/style/slimbox.css" media="screen" />
	<!--[if lt IE 7]>
		<link rel="stylesheet" type="text/css" href="./decode/style/style_ie.css" media="screen" />
	<![endif]-->
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/mootools/1.2.1/mootools-yui-compressed.js"></script>
	<script type="text/javascript" src="./decode/js/script.js"></script>
	<script type="text/javascript" src="./decode/js/slimbox.js"></script>
</head>

<body>
<div id="wrapper">
<h1>decode explorer</h1>
<h2 id="breadcrumb">
<?php foreach ($breadcrumb as $index => $folder): ?>
<a href="?path=<?php echo $folder['path'] ?>"><?php echo $folder['name'] ?></a><?php if ($index != $breadcrumb_length - 1) echo ' &raquo; ' ?>
<?php endforeach; ?>
</h2>
<div id="loading"><img src="./decode/img/loading.gif" alt="Loading" /></div>
<table>
	<thead>
		<tr>
			<th class="icon">&nbsp;</th>
			<th class="name"><a href="<?php echo $name_sort_url ?>"><?php echo Language::get('name') ?></a><img src="./decode/img/arrow_<?php echo $sorted_by == 'name' ? $sorted_in : 'blank' ?>.png" alt="*" /></th>
			<th class="size"><a href="<?php echo $size_sort_url ?>"><?php echo Language::get('size') ?></a><img src="./decode/img/arrow_<?php echo $sorted_by == 'size' ? $sorted_in : 'blank' ?>.png" alt="*" /></th>
			<th class="date"><a href="<?php echo $date_sort_url ?>"><?php echo Language::get('date') ?></a><img src="./decode/img/arrow_<?php echo $sorted_by == 'date' ? $sorted_in : 'blank' ?>.png" alt="*" /></th>
		</tr>
		<tr id="back" class="<?php echo Helper::alternate('one', 'two') ?>">
			<td>&nbsp;</td>
			<td colspan="3"><a href="?path=<?php echo $parent_folder ?>">..</a></td>
		</tr>
	</thead>
	<tfoot>
		<tr>
			<td>&nbsp;</td>
			<td><span class="total_objects"><?php echo $total_objects ?></span> <?php echo Language::get('objects') ?></td>
			<td class="total_size"><?php echo $total_size ?></td>
			<td>&nbsp;</td>
		</tr>
	</tfoot>
	<tbody>	
<?php foreach ($folders as $folder): ?>
		<tr class="folder <?php echo Helper::alternate('one', 'two') ?>">
			<td><img src="./decode/img/<?php echo $folder->get_icon() ?>" alt="*" /></td>
			<td colspan="2"><a href="?path=<?php echo $folder->get_url() ?>"><?php echo $folder->get_name() ?></a></td>
			<td><?php echo $folder->get_date() ?></td>
		</tr>
<?php endforeach; ?>
<?php foreach ($files as $file): ?>
		<tr class="file <?php echo Helper::alternate('one', 'two') ?>">
			<td><img src="./decode/img/<?php echo $file->get_icon() ?>" alt="*" /></td>
			<td><a href="<?php echo $file->get_url() ?>"><?php echo $file->get_name() ?></a></td>
			<td title="<?php echo $file->get_size_in_bytes() ?> bytes"><?php echo $file->get_size() ?></td>
			<td><?php echo $file->get_date() ?></td>
		</tr>
<?php endforeach; ?>
	</tbody>
</table>
</div>

<div id="footer">
	<a href="http://erko.risthein.ee/decode/">decode explorer</a> 2.0 | Copyright &copy; 2009 <a href="http://erko.risthein.ee/" class="foot_name">Erko Risthein</a>
	<!-- decode explorer - Copyright (C) 2009 Erko Risthein | icons by Mark James - www.famfamfam.com -->
</div>
</body>
</html>